package com.xth8013.as;

import com.xth8013.as.servlet.SSOAuth;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
//@PropertySource(value = { "classpath:jdbc.properties"}, ignoreResourceNotFound = true)
@ComponentScan("com.xth8013.as")
@EnableTransactionManagement//开启事务管理
@ServletComponentScan
@MapperScan("com.xth8013.as.dao")
public class Application {

    @Bean
    public ServletRegistrationBean SSOAuth(){
        return new ServletRegistrationBean(new SSOAuth(),"/SSOAuth/*");
    }


    public static void main(String[] args) {
        //入口运行类
        SpringApplication.run(Application.class, args);

    }

}
